<?php 

include '../functions.php';

$str = file_get_contents("http://www.58.com/changecity.html");

$str = file_get_contents("http://zhaopin.baidu.com");

// echo $str;exit;

// $preg  ="/class=\"content-city\">(.+?)<\/a>/";

// $preg = "/\"(.+?)\":\".+?\",/";

$preg = "/<dd><a href=\"\?city=.+?\">(.+?)<\/a><\/dd>/";

$c = preg_match_all($preg, $str, $out);

var_dump($c);

var_dump($out);

file_put_contents('city.txt', json_encode($out[1],JSON_UNESCAPED_UNICODE));













 ?>